<?php get_header(); ?>

<?php 

    $canon_options_post = get_option('canon_options_post');

    // SET STYLE 
    $style = $canon_options_post['cat_style'];

?>

         <!-- Start Main Body -->
        <div class="main-container">
            <div class="main wrapper clearfix">
                
                                
                <!-- Start Main Content -->
                <div class="main-content<?php if ($style != "sidebar") { echo " full";} ?>">
                    <div class="clearfix">

                        <?php 

                            if ( ($canon_options_post['show_cat_title'] == "checked") || ($canon_options_post['show_cat_description'] == "checked") ) {
                                
                                echo '<div class="category_header">';

                                // CAT TITLE
                                if ($canon_options_post['show_cat_title'] == "checked") {
                                    $cat_obj = get_category_by_slug(get_query_var('category_name')); 

                                    echo "<h1>";
                                    echo $cat_obj->name;
                                    echo "</h1>";
                                } 

                                // CAT DESCRIPTION
                                if ($canon_options_post['show_cat_description'] == "checked") {

                                    echo "<span class='lead'>";
                                    echo category_description();
                                    echo "</span>";
                                } 
                                
                                echo '<hr/></div>';
                            }




                        ?>


                        <?php 

                            if ($style == "full") {

                                get_template_part('inc/templates/template_blog_full');

                            } elseif ($style == "sidebar") {

                                get_template_part('inc/templates/template_blog_sidebar');

                            } else {

                                get_template_part('inc/templates/template_blog_neat');

                            }

                        ?>

        <!-- NB: wrapper containers are ended in templates -->

<?php get_footer(); ?>
